package week6.annotation;

import org.eclipse.microprofile.config.spi.ConfigSource;

import java.net.URL;

/**
 * The factory interface of {@link org.eclipse.microprofile.config.spi.ConfigSource}
 *
 * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
 * @since 1.0.0
 */
public interface ConfigSourceFactory {

    /**
     * Create a new {@link org.eclipse.microprofile.config.spi.ConfigSource} instance
     *
     * @param name     {@link ConfigSource#getName()}
     * @param ordinal  {@link ConfigSource#getOrdinal()}
     * @param resource the {@link URL} for the content of {@link ConfigSource}
     * @param encoding the encoding of the content of resource
     * @return {@link org.eclipse.microprofile.config.spi.ConfigSource}
     */
    org.eclipse.microprofile.config.spi.ConfigSource createConfigSource(String name, int ordinal, URL resource, String encoding);
}
